<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>GMimeFilterOpenPGP: GMime 3.0 Reference Manual</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
<link rel="home" href="index.html" title="GMime 3.0 Reference Manual">
<link rel="up" href="Filters.html" title="Stream Filters">
<link rel="prev" href="GMimeFilterHTML.html" title="GMimeFilterHTML">
<link rel="next" href="GMimeFilterSmtpData.html" title="GMimeFilterSmtpData">
<meta name="generator" content="GTK-Doc V1.32 (XML mode)">
<link rel="stylesheet" href="style.css" type="text/css">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="5"><tr valign="middle">
<td width="100%" align="left" class="shortcuts">
<a href="#" class="shortcut">Top</a><span id="nav_description">  <span class="dim">|</span> 
                  <a href="#GMimeFilterOpenPGP.description" class="shortcut">Description</a></span><span id="nav_hierarchy">  <span class="dim">|</span> 
                  <a href="#GMimeFilterOpenPGP.object-hierarchy" class="shortcut">Object Hierarchy</a></span>
</td>
<td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td>
<td><a accesskey="u" href="Filters.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td>
<td><a accesskey="p" href="GMimeFilterHTML.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
<td><a accesskey="n" href="GMimeFilterSmtpData.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
</tr></table>
<div class="refentry">
<a name="GMimeFilterOpenPGP"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2><span class="refentrytitle"><a name="GMimeFilterOpenPGP.top_of_page"></a>GMimeFilterOpenPGP</span></h2>
<p>GMimeFilterOpenPGP — Detect OpenPGP markers.</p>
</td>
<td class="gallery_image" valign="top" align="right"></td>
</tr></table></div>
<div class="refsect1">
<a name="GMimeFilterOpenPGP.functions"></a><h2>Functions</h2>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="functions_proto_type">
<col class="functions_proto_name">
</colgroup>
<tbody>
<tr>
<td class="function_type">
<a class="link" href="GMimeFilter.html" title="GMimeFilter"><span class="returnvalue">GMimeFilter</span></a> *
</td>
<td class="function_name">
<a class="link" href="GMimeFilterOpenPGP.html#g-mime-filter-openpgp-new" title="g_mime_filter_openpgp_new ()">g_mime_filter_openpgp_new</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="GMimeFilterOpenPGP.html#GMimeOpenPGPData" title="enum GMimeOpenPGPData"><span class="returnvalue">GMimeOpenPGPData</span></a>
</td>
<td class="function_name">
<a class="link" href="GMimeFilterOpenPGP.html#g-mime-filter-openpgp-get-data-type" title="g_mime_filter_openpgp_get_data_type ()">g_mime_filter_openpgp_get_data_type</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">gint64</span>
</td>
<td class="function_name">
<a class="link" href="GMimeFilterOpenPGP.html#g-mime-filter-openpgp-get-begin-offset" title="g_mime_filter_openpgp_get_begin_offset ()">g_mime_filter_openpgp_get_begin_offset</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">gint64</span>
</td>
<td class="function_name">
<a class="link" href="GMimeFilterOpenPGP.html#g-mime-filter-openpgp-get-end-offset" title="g_mime_filter_openpgp_get_end_offset ()">g_mime_filter_openpgp_get_end_offset</a> <span class="c_punctuation">()</span>
</td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect1">
<a name="GMimeFilterOpenPGP.other"></a><h2>Types and Values</h2>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="other_proto_type">
<col class="other_proto_name">
</colgroup>
<tbody>
<tr>
<td class="datatype_keyword">enum</td>
<td class="function_name"><a class="link" href="GMimeFilterOpenPGP.html#GMimeOpenPGPData" title="enum GMimeOpenPGPData">GMimeOpenPGPData</a></td>
</tr>
<tr>
<td class="datatype_keyword">enum</td>
<td class="function_name"><a class="link" href="GMimeFilterOpenPGP.html#GMimeOpenPGPState" title="enum GMimeOpenPGPState">GMimeOpenPGPState</a></td>
</tr>
<tr>
<td class="datatype_keyword"> </td>
<td class="function_name"><a class="link" href="GMimeFilterOpenPGP.html#GMimeOpenPGPMarker" title="GMimeOpenPGPMarker">GMimeOpenPGPMarker</a></td>
</tr>
<tr>
<td class="datatype_keyword">struct</td>
<td class="function_name"><a class="link" href="GMimeFilterOpenPGP.html#GMimeFilterOpenPGP-struct" title="struct GMimeFilterOpenPGP">GMimeFilterOpenPGP</a></td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect1">
<a name="GMimeFilterOpenPGP.object-hierarchy"></a><h2>Object Hierarchy</h2>
<pre class="screen">    GObject
    <span class="lineart">╰──</span> <a class="link" href="GMimeFilter.html" title="GMimeFilter">GMimeFilter</a>
        <span class="lineart">╰──</span> GMimeFilterOpenPGP
</pre>
</div>
<div class="refsect1">
<a name="GMimeFilterOpenPGP.description"></a><h2>Description</h2>
<p>A <a class="link" href="GMimeFilter.html" title="GMimeFilter"><span class="type">GMimeFilter</span></a> for detecting OpenPGP markers and filtering out any content outside the bounds of said markers.</p>
</div>
<div class="refsect1">
<a name="GMimeFilterOpenPGP.functions_details"></a><h2>Functions</h2>
<div class="refsect2">
<a name="g-mime-filter-openpgp-new"></a><h3>g_mime_filter_openpgp_new ()</h3>
<pre class="programlisting"><a class="link" href="GMimeFilter.html" title="GMimeFilter"><span class="returnvalue">GMimeFilter</span></a> *
g_mime_filter_openpgp_new (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
<p>Creates a new <a class="link" href="GMimeFilterOpenPGP.html" title="GMimeFilterOpenPGP"><span class="type">GMimeFilterOpenPGP</span></a> filter.</p>
<div class="refsect3">
<a name="g-mime-filter-openpgp-new.returns"></a><h4>Returns</h4>
<p> a new <a class="link" href="GMimeFilterOpenPGP.html" title="GMimeFilterOpenPGP"><span class="type">GMimeFilterOpenPGP</span></a> filter.</p>
</div>
<p class="since">Since: 3.2</p>
</div>
<hr>
<div class="refsect2">
<a name="g-mime-filter-openpgp-get-data-type"></a><h3>g_mime_filter_openpgp_get_data_type ()</h3>
<pre class="programlisting"><a class="link" href="GMimeFilterOpenPGP.html#GMimeOpenPGPData" title="enum GMimeOpenPGPData"><span class="returnvalue">GMimeOpenPGPData</span></a>
g_mime_filter_openpgp_get_data_type (<em class="parameter"><code><a class="link" href="GMimeFilterOpenPGP.html" title="GMimeFilterOpenPGP"><span class="type">GMimeFilterOpenPGP</span></a> *openpgp</code></em>);</pre>
<p>Gets the type of OpenPGP data that has been detected.</p>
<div class="refsect3">
<a name="g-mime-filter-openpgp-get-data-type.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>openpgp</p></td>
<td class="parameter_description"><p>A <a class="link" href="GMimeFilterOpenPGP.html" title="GMimeFilterOpenPGP"><span class="type">GMimeFilterOpenPGP</span></a> filter</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="g-mime-filter-openpgp-get-data-type.returns"></a><h4>Returns</h4>
<p> a <a class="link" href="GMimeFilterOpenPGP.html#GMimeOpenPGPData" title="enum GMimeOpenPGPData"><span class="type">GMimeOpenPGPData</span></a> value.</p>
</div>
<p class="since">Since: 3.2</p>
</div>
<hr>
<div class="refsect2">
<a name="g-mime-filter-openpgp-get-begin-offset"></a><h3>g_mime_filter_openpgp_get_begin_offset ()</h3>
<pre class="programlisting"><span class="returnvalue">gint64</span>
g_mime_filter_openpgp_get_begin_offset
                               (<em class="parameter"><code><a class="link" href="GMimeFilterOpenPGP.html" title="GMimeFilterOpenPGP"><span class="type">GMimeFilterOpenPGP</span></a> *openpgp</code></em>);</pre>
<p>Gets the stream offset of the beginning of the OpenPGP data block, if any have been found.</p>
<div class="refsect3">
<a name="g-mime-filter-openpgp-get-begin-offset.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>openpgp</p></td>
<td class="parameter_description"><p>A <a class="link" href="GMimeFilterOpenPGP.html" title="GMimeFilterOpenPGP"><span class="type">GMimeFilterOpenPGP</span></a> filter</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="g-mime-filter-openpgp-get-begin-offset.returns"></a><h4>Returns</h4>
<p> The stream offset or <code class="literal">-1</code> if no OpenPGP block was found.</p>
</div>
<p class="since">Since: 3.2</p>
</div>
<hr>
<div class="refsect2">
<a name="g-mime-filter-openpgp-get-end-offset"></a><h3>g_mime_filter_openpgp_get_end_offset ()</h3>
<pre class="programlisting"><span class="returnvalue">gint64</span>
g_mime_filter_openpgp_get_end_offset (<em class="parameter"><code><a class="link" href="GMimeFilterOpenPGP.html" title="GMimeFilterOpenPGP"><span class="type">GMimeFilterOpenPGP</span></a> *openpgp</code></em>);</pre>
<p>Gets the stream offset of the end of the OpenPGP data block, if any have been found.</p>
<div class="refsect3">
<a name="g-mime-filter-openpgp-get-end-offset.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>openpgp</p></td>
<td class="parameter_description"><p>A <a class="link" href="GMimeFilterOpenPGP.html" title="GMimeFilterOpenPGP"><span class="type">GMimeFilterOpenPGP</span></a> filter</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="g-mime-filter-openpgp-get-end-offset.returns"></a><h4>Returns</h4>
<p> The stream offset or <code class="literal">-1</code> if no OpenPGP block was found.</p>
</div>
<p class="since">Since: 3.2</p>
</div>
</div>
<div class="refsect1">
<a name="GMimeFilterOpenPGP.other_details"></a><h2>Types and Values</h2>
<div class="refsect2">
<a name="GMimeOpenPGPData"></a><h3>enum GMimeOpenPGPData</h3>
<p>The type of OpenPGP data found, if any.</p>
<div class="refsect3">
<a name="GMimeOpenPGPData.members"></a><h4>Members</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="300px" class="enum_members_name">
<col class="enum_members_description">
<col width="200px" class="enum_members_annotations">
</colgroup>
<tbody>
<tr>
<td class="enum_member_name"><p><a name="GMIME-OPENPGP-DATA-NONE:CAPS"></a>GMIME_OPENPGP_DATA_NONE</p></td>
<td class="enum_member_description">
<p>No OpenPGP data found.</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="GMIME-OPENPGP-DATA-ENCRYPTED:CAPS"></a>GMIME_OPENPGP_DATA_ENCRYPTED</p></td>
<td class="enum_member_description">
<p>The content contains OpenPGP encrypted data.</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="GMIME-OPENPGP-DATA-SIGNED:CAPS"></a>GMIME_OPENPGP_DATA_SIGNED</p></td>
<td class="enum_member_description">
<p>The content contains OpenPGP signed data.</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="GMIME-OPENPGP-DATA-PUBLIC-KEY:CAPS"></a>GMIME_OPENPGP_DATA_PUBLIC_KEY</p></td>
<td class="enum_member_description">
<p>The content contains OpenPGP public key data.</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="GMIME-OPENPGP-DATA-PRIVATE-KEY:CAPS"></a>GMIME_OPENPGP_DATA_PRIVATE_KEY</p></td>
<td class="enum_member_description">
<p>The content contains OpenPGP private key data.</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
</div>
<hr>
<div class="refsect2">
<a name="GMimeOpenPGPState"></a><h3>enum GMimeOpenPGPState</h3>
<p>The current state of the <a class="link" href="GMimeFilterOpenPGP.html" title="GMimeFilterOpenPGP"><span class="type">GMimeFilterOpenPGP</span></a> filter.</p>
<div class="refsect3">
<a name="GMimeOpenPGPState.members"></a><h4>Members</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="300px" class="enum_members_name">
<col class="enum_members_description">
<col width="200px" class="enum_members_annotations">
</colgroup>
<tbody>
<tr>
<td class="enum_member_name"><p><a name="GMIME-OPENPGP-NONE:CAPS"></a>GMIME_OPENPGP_NONE</p></td>
<td class="enum_member_description">
<p>No OpenPGP markers have been found (yet).</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="GMIME-OPENPGP-BEGIN-PGP-MESSAGE:CAPS"></a>GMIME_OPENPGP_BEGIN_PGP_MESSAGE</p></td>
<td class="enum_member_description">
<p>The "-----BEGIN PGP MESSAGE-----" marker has been found.</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="GMIME-OPENPGP-END-PGP-MESSAGE:CAPS"></a>GMIME_OPENPGP_END_PGP_MESSAGE</p></td>
<td class="enum_member_description">
<p>The "-----END PGP MESSAGE-----" marker has been found.</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="GMIME-OPENPGP-BEGIN-PGP-SIGNED-MESSAGE:CAPS"></a>GMIME_OPENPGP_BEGIN_PGP_SIGNED_MESSAGE</p></td>
<td class="enum_member_description">
<p>The "-----BEGIN PGP SIGNED MESSAGE-----" marker has been found.</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="GMIME-OPENPGP-BEGIN-PGP-SIGNATURE:CAPS"></a>GMIME_OPENPGP_BEGIN_PGP_SIGNATURE</p></td>
<td class="enum_member_description">
<p>The "-----BEGIN PGP SIGNATURE-----" marker has been found.</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="GMIME-OPENPGP-END-PGP-SIGNATURE:CAPS"></a>GMIME_OPENPGP_END_PGP_SIGNATURE</p></td>
<td class="enum_member_description">
<p>The "-----END PGP SIGNATURE-----" marker has been found.</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="GMIME-OPENPGP-BEGIN-PGP-PUBLIC-KEY-BLOCK:CAPS"></a>GMIME_OPENPGP_BEGIN_PGP_PUBLIC_KEY_BLOCK</p></td>
<td class="enum_member_description">
<p>The "-----BEGIN PGP PUBLIC KEY BLOCK-----" marker has been found.</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="GMIME-OPENPGP-END-PGP-PUBLIC-KEY-BLOCK:CAPS"></a>GMIME_OPENPGP_END_PGP_PUBLIC_KEY_BLOCK</p></td>
<td class="enum_member_description">
<p>The "-----END PGP PUBLIC KEY BLOCK-----" marker has been found.</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="GMIME-OPENPGP-BEGIN-PGP-PRIVATE-KEY-BLOCK:CAPS"></a>GMIME_OPENPGP_BEGIN_PGP_PRIVATE_KEY_BLOCK</p></td>
<td class="enum_member_description">
<p>The "-----BEGIN PGP PRIVATE KEY BLOCK-----" marker has been found.</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="GMIME-OPENPGP-END-PGP-PRIVATE-KEY-BLOCK:CAPS"></a>GMIME_OPENPGP_END_PGP_PRIVATE_KEY_BLOCK</p></td>
<td class="enum_member_description">
<p>The "-----END PGP PRIVATE KEY BLOCK-----" marker has been found.</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<p class="since">Since: 3.2</p>
</div>
<hr>
<div class="refsect2">
<a name="GMimeOpenPGPMarker"></a><h3>GMimeOpenPGPMarker</h3>
<pre class="programlisting">typedef struct {
	const char *marker;
	size_t len;
	GMimeOpenPGPState before;
	GMimeOpenPGPState after;
	gboolean is_end_marker;
} GMimeOpenPGPMarker;
</pre>
<p>An OpenPGP marker for use with GMime's internal state machines used for detecting OpenPGP blocks.</p>
<div class="refsect3">
<a name="GMimeOpenPGPMarker.members"></a><h4>Members</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="300px" class="struct_members_name">
<col class="struct_members_description">
<col width="200px" class="struct_members_annotations">
</colgroup>
<tbody>
<tr>
<td class="struct_member_name"><p>const <span class="type">char</span> *<em class="structfield"><code><a name="GMimeOpenPGPMarker.marker"></a>marker</code></em>;</p></td>
<td class="struct_member_description"><p>The OpenPGP marker.</p></td>
<td class="struct_member_annotations"> </td>
</tr>
<tr>
<td class="struct_member_name"><p><span class="type">size_t</span> <em class="structfield"><code><a name="GMimeOpenPGPMarker.len"></a>len</code></em>;</p></td>
<td class="struct_member_description"><p>The length of the OpenPGP marker.</p></td>
<td class="struct_member_annotations"> </td>
</tr>
<tr>
<td class="struct_member_name"><p><a class="link" href="GMimeFilterOpenPGP.html#GMimeOpenPGPState" title="enum GMimeOpenPGPState"><span class="type">GMimeOpenPGPState</span></a> <em class="structfield"><code><a name="GMimeOpenPGPMarker.before"></a>before</code></em>;</p></td>
<td class="struct_member_description"><p>The <a class="link" href="GMimeFilterOpenPGP.html#GMimeOpenPGPState" title="enum GMimeOpenPGPState"><span class="type">GMimeOpenPGPState</span></a> that the state machine must be in before encountering this marker.</p></td>
<td class="struct_member_annotations"> </td>
</tr>
<tr>
<td class="struct_member_name"><p><a class="link" href="GMimeFilterOpenPGP.html#GMimeOpenPGPState" title="enum GMimeOpenPGPState"><span class="type">GMimeOpenPGPState</span></a> <em class="structfield"><code><a name="GMimeOpenPGPMarker.after"></a>after</code></em>;</p></td>
<td class="struct_member_description"><p>The <a class="link" href="GMimeFilterOpenPGP.html#GMimeOpenPGPState" title="enum GMimeOpenPGPState"><span class="type">GMimeOpenPGPState</span></a> that the state machine will transition into once this marker is found.</p></td>
<td class="struct_member_annotations"> </td>
</tr>
<tr>
<td class="struct_member_name"><p><span class="type">gboolean</span> <em class="structfield"><code><a name="GMimeOpenPGPMarker.is-end-marker"></a>is_end_marker</code></em>;</p></td>
<td class="struct_member_description"><p><code class="literal">TRUE</code> if the marker is an end marker; otherwise, <code class="literal">FALSE</code>.</p></td>
<td class="struct_member_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<p class="since">Since: 3.2</p>
</div>
<hr>
<div class="refsect2">
<a name="GMimeFilterOpenPGP-struct"></a><h3>struct GMimeFilterOpenPGP</h3>
<pre class="programlisting">struct GMimeFilterOpenPGP;</pre>
<p>A filter to detect OpenPGP markers.</p>
<div class="refsect3">
<a name="GMimeFilterOpenPGP.members"></a><h4>Members</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="300px" class="struct_members_name">
<col class="struct_members_description">
<col width="200px" class="struct_members_annotations">
</colgroup>
<tbody></tbody>
</table></div>
</div>
<p class="since">Since: 3.2</p>
</div>
</div>
</div>
<div class="footer">
<hr>Generated by GTK-Doc V1.32</div>
</body>
</html>